package com.bzg.manager.param;

import java.text.SimpleDateFormat;
import java.util.Date;


/**
 * Description:查询中心使用参数
 *
 * @author gmy
 * @date 2017年3月1日 上午10:21:07
 */
public class BusiQueryParam {

	private String vendCode;// 供应商编号
	private String partNo;//零件编号
	private String aSN_No;//ASN号
	private String caseType;//容器类型
	private Date date; // 日期 (单个日期查询使用)
	private Date startDate; // 起始日期
	private Date endDate; // 结束日期
	private String wHCode; // 仓库代码
	private Integer currPage;// 当前页
	private Integer pageSize;// 每页显示多少条
	
	
	public String getCaseType() {
		return caseType;
	}

	public void setCaseType(String caseType) {
		this.caseType = caseType;
	}

	public String getaSN_No() {
		return aSN_No;
	}

	public void setaSN_No(String aSN_No) {
		this.aSN_No = aSN_No;
	}

	public String getPartNo() {
		return partNo;
	}

	public void setPartNo(String partNo) {
		this.partNo = partNo;
	}

	public SimpleDateFormat getFormat(){
		SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
		return format;
	}

	public String getStr_startDate() {
		if(startDate != null){
			SimpleDateFormat format = getFormat();
			String dataFor = format.format(startDate);
			return dataFor;
		}
		return "";
	}

	public String getStr_endDate() {
		if(endDate != null){
			SimpleDateFormat format = getFormat();
			String dataFor = format.format(endDate);
			return dataFor;
		}
		return "";
	}

	public Integer getStartNum() {
		if (currPage != null && pageSize != null) {
			return (currPage - 1) * pageSize;
		} else {
			return 0;
		}
	}

	public Integer getEndNum() {
		if (currPage != null && pageSize != null) {
			return currPage * pageSize;
		} else {
			return 0;
		}
	}

	public String getVendCode() {
		return vendCode;
	}

	public void setVendCode(String vendCode) {
		this.vendCode = vendCode;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}


	public Integer getCurrPage() {
		return currPage;
	}

	public void setCurrPage(Integer currPage) {
		this.currPage = currPage;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public String getwHCode() {
		return wHCode;
	}

	public void setwHCode(String wHCode) {
		this.wHCode = wHCode;
	}

}
